[Unit]
Description=Redis master
After=network.target
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
ExecStart={{ redis.dir.root }}/redis-master/bin/redis-server {{ redis.dir.root }}/redis-master/conf/redis.conf
ExecStop={{ redis.dir.root }}/redis-master/bin/redis-cli -h {{ansible_facts.ens33.ipv4.address }}  -p {{ redis.port.master }} shutdown
RuntimeDirectory=redis-master
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target
